<?php

namespace app\common\model;

use think\Model;

/**
 * 客户拜访记录数据模型
 */
class Visitlog extends Model
{

    /**
     * 获取客户拜访记录
     * @param $customer_id
     * @return array
     */
    public static function getOneVisitLogBycustomerId($customer_id){

        $array = self::where(function($query) use ($customer_id){
            $query->where('customer_id',$customer_id);
        })->order('id desc')->find();
        return $array;
    }

}